# -*- coding:utf-8 -*-
"""
Author：Administrator
Date:2021年12月02日
"""
import pandas as pd

pd.set_option('display.max_columns', 500)
pd.set_option('display.width', 1000)
pd.set_option('display.unicode.east_asian_width', True)
df = pd.read_csv('../source/JD.csv', encoding='gbk')
print(df.head())
print("=" * 30)
df1 = df[['一级分类', '7天点击量', '订单预定']]
# print(df1.groupby('一级分类').agg(['mean','sum']))
print(df1.groupby('一级分类').agg({'7天点击量':['mean','sum'],'订单预定':['sum']}))

